import matplotlib.pyplot as plt

plt.rcParams['font.sans-serif'] = ['fangsong'] # 正常显示中文字体
plt.rcParams['axes.unicode_minus'] = False  # 正常显示负号

name = ['路飞', '香吉士', '索隆', '布鲁克']
power = [90, 27, 37, 86]

plt.grid()
plt.title('海贼Top4')
plt.xlabel('姓名')
plt.ylabel('战力')
size = []
for s in power:
    size.append(s)

# plt.scatter(name, power, s=160, marker='*')
# plt.scatter(name, power, s=[300, 200, 150, 50], marker='*')
# plt.scatter(name, power, s=size, c='r')
plt.scatter(name, power, s=size, c=['r','g','y','b'])
plt.show()